<template>
  <el-container>
    <el-header height="auto"><Announcement></Announcement></el-header>

  </el-container>
</template>

<script>
import Announcement from '../../components/Home/Announcement/Announcement'
export default {
  name: 'Home',
  components: {Announcement},
  mounted () {
    window.onload = this.xmlHttpPostRequest
  },
  methods: {
    xmlHttpGetRequest () {
      let xmlhttp = new XMLHttpRequest()
      xmlhttp.open('GET', 'http://127.0.0.1:3100/users/show')
      xmlhttp.send(null)
      xmlhttp.onreadystatechange = function (res) {
        if (xmlhttp.readyState === 4) {
          if (xmlhttp.status === 200) {
            console.log(xmlhttp.responseURL)
            console.log(xmlhttp.response)
          }
        }
      }
    }
  }
}
</script>

<style scoped>

</style>
